class ControlPanel : public QDockWidget
{
public:
    ControlPanel(QWidget* parent = nullptr) : QDockWidget(parent)
    {
        auto mainWidget = new QWidget;
        auto layout = new QVBoxLayout(mainWidget);

        // 分析设置组
        auto analysisGroup = new QGroupBox("分析设置");
        auto analysisLayout = new QGridLayout;
        analysisLayout->addWidget(new QCheckBox("角度检查"), 0, 0);
        analysisLayout->addWidget(new QCheckBox("纵横比检查"), 0, 1);
        analysisLayout->addWidget(new QCheckBox("扭曲度检查"), 1, 0);
        analysisLayout->addWidget(new QCheckBox("雅可比值检查"), 1, 1);
        analysisGroup->setLayout(analysisLayout);

        // 优化设置组
        auto optGroup = new QGroupBox("优化设置");
        auto optLayout = new QFormLayout;
        optLayout->addRow("目标质量:", new QDoubleSpinBox);
        optLayout->addRow("最大迭代:", new QSpinBox);
        optLayout->addRow("收敛阈值:", new QDoubleSpinBox);
        optGroup->setLayout(optLayout);

        // 添加到主布局
        layout->addWidget(analysisGroup);
        layout->addWidget(optGroup);
        layout->addStretch();

        setWidget(mainWidget);
    }
}; 